<!DOCTYPE html>
<%@page language="java" pageEncoding="utf-8" contentType="text/html; charset=UTF-8"%>
<%
	String ctx = request.getContextPath();
%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>云存储列表</title>
    <link rel="stylesheet" type="text/css" href="css/basic.css" />
    <link rel="stylesheet" type="text/css" href="css/ui.css" />
    <link rel="stylesheet" type="text/css" href="css/common.css" />
    <!-- 设置JS全局变量  ctx -->
	<script type="text/javascript">
		var ctx = "<%=request.getContextPath()%>";
	</script>
</head>
<body>
    <jsp:include page="head.jsp"></jsp:include>
    <div class="container">
        <jsp:include page="customer_left.jsp"></jsp:include>
        <div class="page-content">
            <div id="content-scroll">
                <div class="cont-area clearfix">
                    <i class="fl"></i><span class="fl"><a href="index.jsp">首页</a>&gt;<a href="customerList.jsp">后台管理</a>&gt;云存储</span>
                </div>
                <div class="data-grid">
                    <div class="grid-toolbar">
                        <div class="search-box clearfix">
                            <div class="search-group">
                                <label>云存储名称：</label>
                                <input type="text" name="name" id="j-cloudName" />
                            </div>

                            <div class="search-btns">
                                <div class="long-search-btns">
                                    <button class="clearfix btn j-search" type="button"><i class="icos icos-search fl"></i><span class="fl">查询</span></button>
                                    <button class="clearfix btn j-reset" type="button"><i class="icos icos-reset fl"></i><span class="fl">重置</span></button>
                                    <!--<button class="clearfix btn j-advSearch" type="button"><i class="icos icos-level fl"></i><span class="fl">高级查询</span></button>-->
                                </div>
                                <div class="short-search-btns">
                                    <button class="btn" type="button"><i class="icos icos-list"></i></button>
                                    <div class="btns-list">
                                        <ul>
                                            <li><a class="clearfix j-search" href="javascript:;">查询</a></li>
                                            <li><a class="clearfix j-reset" href="javascript:;">重置</a></li>
                                            <!--<li><a class="clearfix j-advSearch" href="javascript:;">高级查询</a></li>-->
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="fn-btns">
                            <button class="btn" type="button" id="j-addStorageCloud">新增</button>
                            <button class="btn" type="button" id="j-deleteStorageCloud">批量删除</button>
                        </div>
                    </div>
                    <div class="thead">
                        <table>
                            <tbody>
                                <tr>
                                    <th width="24px"><input class="j-checkAll" type="checkbox"></th>
                                    <th width="300px">云存储名称</th>
                                    <th width="300px">总空间</th>
                                    <th width="300px">已用空间</th>
                                    <th width="100px">操作</th>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tbody">
                        <table>
                            <tbody id="j-list">
                            <script type="text/ysmart" data-name="list">
                                <@ yepjs.isArray(DATA) && yepjs.forEach(DATA, function(item, index){ @>
                                <tr data-id="<@=item.id @>">
                                    <td width="24px"><input type="checkbox" data-id="<@=item.id @>" class="j-checkEach" /></td>
                                    <td width="300px"><@=item.name @></td>
                                    <td width="300px"><@=item.spaceCapacity @>G</td>
                                    <td width="300px"><@=item.spaceUsage @>G</td>
                                    <td width="100px">
                                        <a href="javascript:;" class="j-admin">管理</a>
                                    </td>
                                </tr>
                                <@ }); @>
                            </script>
                            </tbody>
                        </table>
                    </div>
                    <div class="grid-page clearfix" id="j-page">
                        <div class="page-left fl"><span>共<span id="j-totalNum">0</span>条</span></div>
                        <div class="page-right fl">
                            <a href="javascript:;" class="j-page-first">首页</a>
                            <a href="javascript:;" class="j-page-prev">上一页</a>
                            <span>第<input type="text" value="1" class="j-page-cur">页，共<span class="j-page-totalPage">1</span>页</span>
                            <a href="javascript:;" class="j-page-next">下一页</a>
                            <a href="javascript:;" class="j-page-last">尾页</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/ysmart" data-name="storageCloudTpl">
        <div class="ui-dialog-form">
            <form>
                <div class="form-group">
                    <label><em>*</em>云存储名称：</label>
                    <input class="required" type="text" name="name" value="<@=DATA.name @>" />
                    <span class="message msg-tip"><em></em><i>请输入云存储名称</i></span>
                </div>
                <div class="form-group">
                    <label class="vertical-top"><em>*</em>总空间：</label>
					<input class="required" type="text" name="spaceCapacity" value="<@=DATA.spaceCapacity @>" /> G
                    <span class="message msg-tip"><em></em><i>请输入云存储总空间</i></span>
                </div>
				<div class="form-group">
                    <label class="vertical-top"><em>*</em>已用空间：</label>
					<input class="required" type="text" name="spaceUsage" value="<@=DATA.spaceUsage @>" /> G
                    <span class="message msg-tip"><em></em><i>请输入已用空间</i></span>
                </div>
                <input id="j-dataId" type="hidden" name="id" value="<@=DATA.id @>"/>
            </form>
        </div>
    </script>
    <script src="js/yep.min.js" type="text/javascript" data-config="YBA.Config.js"></script>
    <script src="js/common.js" type="text/javascript"></script>
    <script type="text/javascript">
        yepjs.use({
            name: ["jquery", "YBA.Plugin.slimscroll","YBA.Common"],
            callback: function () {

                $('#side-scroll').slimscroll({
                    height:"100%"
                });

                YBA.Common.sidebar();
                YBA.Common.gridWidth();
            }
        });
        yepjs.use({
            name: "YBA.Logic.Admin.storageCloud",
            callback: function () {
                YBA.Logic.Admin.list();
            }
        });
    </script>
</body>
</html>
